package com.automannn.dubbo.activateTest;

import com.automannn.dubbo.handleExtention.HandlerTest;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;

import java.util.List;

/**
 * @author automannn
 * @Date 2023/5/23
 */
public class ActivatedTest {
    public static void main(String[] args) {
        URL url = URL.valueOf("dubbo://127.0.0.1:25088?name=filterA&auto=testb");
        List<HandlerTest> adaptiveHandlerList = ExtensionLoader.getExtensionLoader(HandlerTest.class).getActivateExtension(url,"name","test");

        URL url1 = URL.valueOf("dubbo://127.0.0.1:25088?name=filterA&auto=testa");
        List<HandlerTest> adaptiveHandlerList1 = ExtensionLoader.getExtensionLoader(HandlerTest.class).getActivateExtension(url1,"name","test");

        System.out.println(adaptiveHandlerList);
        System.out.println(adaptiveHandlerList1);
    }
}
